#include <iostream>

using namespace std;

typedef long long LL;

int main()
{
	int a, b, c;
	
	cin >> a >> b >> c;
	
	LL s1 = (a + c - 1) / c;
	LL s2 = (b + c - 1) / c;
	
	cout << s1 * s2 << endl;
	
	return 0; 
}